<%@page import="pro.syj.dao.ScoreDao"%>
<%@page import="pro.syj.bean.Score"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>查询具体学生成绩</title>
	<link rel='stylesheet' href='CSS/decorator1.css'>
</head>

<body>
	<%  
		String cid = "";
		if (request.getParameter("cid") != null) {
			cid = request.getParameter("cid");
		}
		String sid = "";
		if (request.getParameter("sid") != null) {
			sid = request.getParameter("sid");
		}
		cid = cid.trim();
		sid = sid.trim();
		
		ArrayList<Score> list = new ArrayList<>();
		ScoreDao dao = new ScoreDao();
		if (!"".equals(sid) && !"".equals(cid)) {
			list = dao.selectOne(sid, cid);
		}else if(!"".equals(sid) && "".equals(cid)){
			list = dao.selectAll(sid);
		}else if("".equals(sid) && !"".equals(cid)){
			list = dao.selectAll2(cid);
		}else{
			list = dao.selectAllScore();
		}
		request.setAttribute("scorelist", list);
		request.getRequestDispatcher("managerQscore.jsp").forward(request, response);
	%>
</body>
</html>